The Network File System (NFS) is a widely used protocol for reading and writing of remotely located files. Such remote actions employ a "remote procedure call" (RPC) which is embodied in a message to the remote processor and enables the establishment of a communication session whereby the requested data can either be read or written. When a processor executes one or more applications which require access to a file in a remote processor, an RPC is issued. A processor issuing the RPC is called the client and the processor to which the RPC is directed is called the server.
In the client processor, a number of input/output (I/O) procedures are present which are established to handle the dispatch of RPCs and the receipt of reply messages from the server processor. The client processor includes a limited number of such I/O procedures and they are often referred to as I/O daemons. A daemon is a procedure which, once started, continues until an action is taken to positively cause it to cease. Client processors include a finite number of I/O daemons which handle all read/write RPCs.
Under certain implementations of the NFS protocol, if the remote server does not reply within a predefined time interval (i.e. after an RPC time-out), the I/O daemon retransmits the same RPC message to the server. If the remote server is not available or has failed, the I/O daemon will continue sending out the same RPC message every time an RPC time-out occurs. As a result, the I/O daemon can be occupied the with same RPC request for a long period of time, while the number of queued requests yet to be handled, builds up.
More specifically, a client processor generally queues RPC requests in a first-in/first-out queue, without any priority consideration. The queue is generally configured as a linked list. When a daemon is free, it checks the linked list and accesses the RPC request that was first inserted into the linked list. This same action occurs for other I/O daemons. However, if all daemons happen to be handling RPCs for low priority procedures, and the server to which the RPCs are directed is either out of service or is otherwise unavailable, other RPC requests positioned higher in the linked list are blocked and do not get dispatched. All of the occupied I/O daemons continue churning out retries and the entire system becomes non-functional.
Accordingly, it is an object of this invention to provide a method and apparatus for the handling of RPCs wherein the unavailability of a server does not prevent the dispatch of other queued RPCs.
It is another object of this invention to provide an improved method and apparatus for enabling dispatch of RPCs to a server procedure, wherein priority considerations are taken into account during the dispatch function.
It is yet another object of this invention to provide an improved method and apparatus for dispatch of RPCs to remote server(s) wherein an I/O daemon is enabled to move to another RPC in a queue, if a current RPC cannot be successfully dispatched to a server.